<!DOCTYPE html>
<html>
<head>
<title>参数管理</title>
#parse("sys/header.html")
</head>
<body>
<div id="rrapp" v-cloak>
	<div v-show="showList">
		<div class="grid-btn">
			<div class="form-group col-sm-2">
				<input type="text" class="form-control" v-model="q.key" @keyup.enter="query" placeholder="参数名">
			</div>
			<button class="layui-btn" id="searchSubmit" @click="query"><i class="layui-icon">&#xe615;</i>查 询</button>
			#if($shiro.hasPermission("sys:config:update"))
				<button class="layui-btn" @click="add" type="button"><i class="layui-icon">&#xe61f;</i> 新 增</button>
				<button class="layui-btn layui-btn-normal" type="button" @click="update"><i class="layui-icon">&#xe642;</i>编辑</button>
			#end
			#if($shiro.hasPermission("sys:config:delete"))
				<button class="layui-btn layui-btn-danger" type="button" @click="del"><i class="layui-icon">&#xe640;</i>删除</button>
			#end
		</div>
	    <table id="jqGrid"></table>
	    <div id="jqGridPager"></div>
    </div>
     
   	<div v-show="!showList" class="panel panel-default">
		<div class="panel-heading">{{title}}</div>
		<form class="form-horizontal">
			<div class="form-group">
			   	<div class="col-sm-2 control-label">参数名</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="config.key" placeholder="参数名"/>
			    </div>
			</div>
			<div class="form-group">
			   	<div class="col-sm-2 control-label">参数值</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="config.value" placeholder="参数值"/>
			    </div>
			</div>
			<div class="form-group">
			   	<div class="col-sm-2 control-label">备注</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="config.remark" placeholder="备注"/>
			    </div>
			</div>
			<div class="form-group" style="margin-left: 30%;margin-top: 30px;">
				#if($shiro.hasPermission("sys:config:update"))
				<button class="layui-btn" type="button" @click="saveOrUpdate" >确定</button>
				#end
				<button class="layui-btn layui-btn-warm" type="button" @click="reload" style="margin-left: 30px">返回</button>
			</div>
		</form>
	</div>
</div>

<script src="${rc.contextPath}/statics/js/sys/config.js?_${date.systemTime}"></script>
</body>
</html>